package com.algebra.activiti.web.base;

import com.algebra.activiti.domain.ProcessManage;
import com.algebra.activiti.service.ProcessManageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/process")
public class ProcessManageController {

    @Autowired
    private ProcessManageService processManageService;

    @RequestMapping("/list")
    public String list(ModelMap modelMap) {
        ProcessManage processManage = new ProcessManage();
        List<ProcessManage> list = processManageService.selectList(processManage);
        modelMap.addAttribute("list", list);
        return "process/list";
    }
}
